package com.example.spinning.mapper;

import com.example.spinning.bean.DeliverOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DeliverOrderMapper {

    //得到出货单
    List<DeliverOrder> getDeliverOrder(@Param("start") Integer start, @Param("count") Integer count);

    //根据id查找产品
    DeliverOrder getDeliverOrderById(Long id);

    //根据条件查找
    List<DeliverOrder> getDeliverOrderByCondition(
            @Param("start") Integer start,
            @Param("count") Integer count,
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no
            );

    //查找表的行数
    int getCountDeliverOrder();

    //根据名字查找表的行数
    int getCountDeliverOrderByCondition(
            @Param("date") String date,
            @Param("receiver") String receiver,
            @Param("norms") String norms,
            @Param("batch_no") String batch_no
    );

    //增加
    int addDdeliverOrder(DeliverOrder order);

    //修改
    int updateDeliverOrderById(DeliverOrder order);

    //删除
    int delDeliverOrderById(@Param("ids") String[] ids);


}
